﻿namespace DingTalk
{
    /// <summary>
    /// 权限变量配置
    /// </summary>
    public static class Permissions
    {
        public const string Name = "Permission";

        /// <summary>
        /// 当前项目是否启用IDS4权限方案
        /// true：表示启动IDS4
        /// false：表示使用JWT
        public static bool IsUseIds4 = false;
    }

    /// <summary>
    /// 路由变量前缀配置
    /// </summary>
    public static class RoutePrefix
    {
        /// <summary>
        /// 前缀名
        /// 如果不需要，尽量留空，不要修改
        /// 除非一定要在所有的 api 前统一加上特定前缀
        /// </summary>
        public const string Name = "";
    }

    /// <summary>
    /// RedisMqKey
    /// </summary>
    public static class RedisMqKey
    {
        public const string Loging = "Loging";
    }

    /// <summary>
    /// 正则表达式
    /// </summary>
    public static class RegexStrings
    {
        /// <summary>
        /// 验证邮箱格式
        /// </summary>
        public const string Email = @"/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/";

        /// <summary>
        /// 验证手机格式
        /// </summary>
        public const string Mobile = @"^1[3456789]\d{9}";
    }

    public static class RedisExpiresSec
    {
        /// <summary>
        /// 一分钟
        /// </summary>
        public const int OneMinute = 60;
        /// <summary>
        /// 十分钟
        /// </summary>
        public const int TenMinute = 600;
        /// <summary>
        /// 30分钟/半个小时
        /// </summary>
        public const int HalfHour = 1800;
        /// <summary>
        /// 一小时
        /// </summary>
        public const int OneHour = 3600;
        /// <summary>
        /// 一天
        /// </summary>
        public const int OneDay = 86400;
        /// <summary>
        /// 一周
        /// </summary>
        public const int OneWeek = 604800;
    }
}
